//
//  ViewController.m
//  LHStarRateView
//
//  Created by LH on 16/9/20.
//  Copyright © 2016年 LH. All rights reserved.
//

#import "ViewController.h"
#import "LHStarRateView.h"
@interface ViewController ()<LHStarRateViewDelegate>
@property (strong, nonatomic) LHStarRateView *starRateView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.starRateView = [[LHStarRateView alloc] initWithFrame:CGRectMake(10, 100, 200,60) numberOfStars:5];
    self.starRateView.delegate=self;
    self.starRateView.scorePercent = 1;
    self.starRateView.hasAnimation = YES;
    [self.view addSubview:self.starRateView];
}
- (void)starRateView:(LHStarRateView *)starRateView scroePercentDidChange:(CGFloat)newScorePercent{
    NSLog(@"%f",(newScorePercent/2)*10);
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
